﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/AdminMaster.Master" Inherits="System.Web.Mvc.ViewPage<VietThuongLMS.ViewModels.HocVien_LopViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

     <legend>
        <h2>
            Danh sách học viên đăng ký</h2>
    </legend>
    <table class="table table-hover table-striped">
        <thead>
            <tr>
                <th>
                    #
                </th>
                <th style="min-width:100px">
                    Tên học viên
                </th>
                <th style="min-width:80px">
                    Loại lớp học
                </th>
                <th>Chuyên đề</th>
                <th>
                    Ngày đăng ký
                </th>
                <th>
                    Điện thoại
                </th>
                <th>Chi nhánh</th>
                <th>Tình trạng</th>
                <th>Thanh toán</th>
                <th>
                    Hành động
                </th>
            </tr>
        </thead>
        <tbody>
            <% 
                if (@Model != null && @Model.ListMoRong.Count > 0)
                {
                    int i = 1;
                    foreach (VietThuongLMS.ViewModels.HocVien_LopMoRongModel @hocVien in @Model.ListMoRong)
                    {%>
            <tr>
                <td>
                    <%=i%>
                </td>
                <td>
                    <%=@hocVien.HoTen%>
                </td>
                <td>
                    <%=@hocVien.TenLoaiLopHoc%>
                </td>
                <td><%=@hocVien.HV_L.ChuyenDe%></td>
                <td>
                    <%=@hocVien.HV_L.NgayDangKy.Value.ToString("dd/MM/yyyy")%>
                </td>
                <td>
                    <%=@hocVien.DienThoai%>
                </td>
                <td>
                    <%=@hocVien.TenChiNhanh%>
                </td>
                <td><% if (@hocVien.HV_L.Deleted == VietThuongLMS.Utils.Constant.GENERAL_STATUS_NORMAL)
                           {%>Chờ duyệt
                    <% }
                           else if (@hocVien.HV_L.Deleted == VietThuongLMS.Utils.Constant.GENERAL_STATUS_ACCEPTED)
                           {%>Đã xếp lớp
                    <%} %></td>
                <td>
                    <%=@hocVien.ThanhToan%>
                </td>
                <td>
                    <%= Html.ActionLink("Chọn lớp", "ChooseClass", "HocVien", new { area = "Admin", id = @hocVien.HV_L.ID }, new { @class = "btn btn-primary" })%>
                    <a href="#myModal_<%=i %>" class="btn btn-danger" data-toggle="modal">Delete</a>
                    <!-- Modal -->
                    <div id="myModal_<%=i %>" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                        aria-hidden="true">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                ×</button>
                            <h3 id="myModalLabel">
                                Delete</h3>
                        </div>
                        <div class="modal-body">
                            <p>
                                Are you sure you want to delete <b>"<%=@hocVien.HV_L.ID%>"</b> ?</p>
                        </div>
                        <div class="modal-footer">
                            <button class="btn" data-dismiss="modal" aria-hidden="true">
                                No</button>
                            <%= Html.ActionLink("Delete", "Delete", "TinTuc", new { area = "Admin", @id = @hocVien.HV_L.ID }, new { @class = "btn btn-primary" })%>
                        </div>
                    </div>
                </td>
            </tr>
            <% i++;
                    }%>
            <tr>
                <td colspan="9">
                    <%
                        if ((string)ViewData["pageLinks"] != "")
                        { %>
                    <%= ViewData["pageLinks"] %>
                    <% } %>
                </td>
            </tr>
            <%
                }
                else
                {
            %>
            <tr>
                <td colspan="9" style="text-align: center;">
                    Empty List
                </td>
            </tr>
        </tbody>
    </table>
    <% }
    %>


</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
